1. Field of the Invention
The present invention relates to a contact-type IC card that functions when its terminals are in contact with the terminals of an external unit. The present invention also relates to an IC card system employing an IC card and to an integrated circuit (IC) used for IC cards. In particular, the present invention relates to a contact-type IC card capable of detecting contact fault on terminals and coping with the contact fault, and to an IC card system employing such an IC card.
2. Description of the Prior Art
IC cards generally have a plastic package and incorporate IC chips such as a microcomputer chip and a memory chip. Among the IC cards, a contact-type IC card has metal terminals that are brought in mutual contact with the terminals of a reader-writer, to communicate data between them. FIG. 1 shows a conventional IC card system employing a contact-type IC card. The IC card 100 is attached to and ejected from a reader-writer 30, which is connected to a host computer (not shown). The reader-writer 30 mediates between the IC card 100 and the host computer.
The IC card 100 has metal terminals 11 to 15, which are brought in contact with terminals 31 to 35 of the reader-writer 30. The IC card 100 incorporates a single semiconductor IC chip containing a CPU 106 and an EEPROM 17. The CPU 106 controls an interface with the reader-writer 30 through the terminals 11 to 15 and an access to the EEPROM 17. The reader-writer 30 has a control circuit 40 that controls the reception and ejection of the IC card 100 and data communication with the IC card 100 and with the host computer. Among the terminals 31 to 35 of the reader-writer 30, the terminal 31 applies a supply voltage VDD to the IC card 100, the terminal 32 is for grounding, the terminal 33 sends a clock signal CLK to the IC card 100, the terminal 34 is an I/0 terminal for data communication with the IC card 100, and the terminal 35 sends a reset signal RST to the IC card 100.
The contact-type IC cards are simpler in structure than non-contact-type IC cards. The contact-type IC cards, however, may cause contact failure at terminals due to, for example, dirt when repeatedly attached to and removed from a reader-writer. If contact at terminals is poor or faulty, the reader-writer is unable to control the IC card and will erroneously write or read data to or from the IC card, thereby degrading the reliability of the IC card. To solve this problem, the contact-type IC cards must have functions of detecting contact fault on terminals and coping with the same.
FIG. 2 shows a semiconductor IC for detecting an open state between terminals. This is disclosed in Japanese Unexamined Patent Publication No. 60-65621 (JP6065621).
The IC 210 has a set 220 of input terminals, a set 230 of output terminals, a sequential circuit 240, and a gate circuit 250 for detecting an open state of the input terminal 221. The sequential circuit 240 usually operates with the input terminals 221 and 222. If the input terminal 221 is open, the gate circuit 250 detects the same and forcibly sets the sequential circuit 240 to a given state to provide a given value.
As soon as the gate circuit 250 detects an open state of the terminal 221, the sequential circuit 240 is set to the given state. When applied to a contact-type IC card, the semiconductor IC disclosed in JP60-65621 quickly stops a CPU in the IC card upon detecting contact fault on, for example, a reset terminal. Then, the IC card is unable to inform a reader-writer of the fault, and the reader-writer is unable to properly and quickly cope with the fault. If such fault occurs at a clock terminal while data is being written into an EEPROM of the IC card, the data will not completely be written, or erroneous data will be stored in the EEPROM. If such fault occurs at the clock terminal while data is being read out of the EEPROM, the data will not completely be read, or erroneous data will be read. In this way, the semiconductor IC disclosed in above JP60-65621 cannot cope with the contact fault and is incapable of improving the reliability of IC cards.